#include<iostream>
using namespace std;
class Date
{
public:
    Date(int year = 1980, int month = 1, int day = 1)
        :_year(year)
        ,_month(month)
        ,_day(day)
    {
        cout << "A(int year = 1980, int month = 1, int day = 1)" << endl;
    }
    Date& Date(const Date& d)
    {
        _year = d._year;
        _month = d._month;
        _day = d._day;
    }
    ~Date()
    {
        cout << "~A()" << endl;
        _year = 0;
        _month = 0;
        _day = 0;
    }
private:
    int _year;
    int _month:
    int _day;
};
ostream& operator<<(ostream& _cout, const Date& d)
{
    _cout << d._year << "年" << d._month << "月" << d._day << "日" << endl;
    return _cout;
}
int main()
{
    Date d1;
    cout << d1;
    Date d2(2022,10,14);
    cout << d2;
    Date d3(d2);
    cout << d3;
    return 0;
}